//@author A0083782W
//Hinter class: show the display at the help prompt label on the main form
//Singleton protocal
//Use generateHint() function to get a hint.
//Pass the current string to this class to get a hint
//If the current input matches nothing, a random hint is displayed
//The random hint will change after every 10 input.

#pragma once
#include <string>
#include "TECommonFunctions.h"
#include "OperationType.h"
#include "ConstantList.h"
#include "UserCommand.h"
#include "UserCommandEnum.h"
using StringManipulator::isEqualString;
using TimeManipulator::getRandomNumber;
using std::string;
using namespace CommandConstants;

//@author A0105495A
static const string HINT_ADD = "add description\\time\\remind time\\repeat rule\\tags\r\n"
	"Time can be a duration.It can read flexible input.Read the help for more info. '\\'(o^W^o)/";
static const string HINT_DELETE = "delete numbers\r\n"
	"numbers can be a range. Remember to display first before delete :-)";
static const string HINT_UNDO = "undo steps\n"
	"If omitted steps is default 1.";
static const string HINT_SEARCH = "search description\\time\\tags\\any additional filters\r\n"
	"filters can be done,not done,reminded,etc; if no feature entered, everything will be displayed";
static const string HINT_HELP = "help command\r\n"
	"if command is omitted, we will display all the command ^_^";
static const string HINT_MODIFY = "modify indices\\description\\time\\remind time\\repeat rule\\tags\r\n"
    "numbers can be a range. Remember to display first before modify :-)";;
static const string HINT_CONFIG = "config\r\n"
    "guidings for config will be displayed after 'config' is entered";
static const string HINT_MARK = "mark indices filter1\\filter2\\...\r\n"
    "numbers can be a range. Remember to display first before mark :-)";;
static const string HINT_EXIT = "exit\r\n"
    "exit will terminate the software and save all the changes made";
static const string HINT_SAVE = "save\r\n"
    "save all the changes made";
static const string HINT_CLEAR = "clear\r\n"
    "clear the main display area";
static const string RANDOM_HINTS[] = {
	"Just input a string we will analyse it for you ^_^\r\n",
	"Time input in this software is really flexible\r\n"
	"E.g. next sunday? from 9pm to 6pm?",
	"Time input in this software is really flexible\r\n"
	"E.g. today? tmr? at 4 in the afternoon?",
	"We accept standard input such as \r\n"
	"14/4/2014 9:00pm 23:00 4/5/14",
	"For filters, you can use \"missed\",\"done\",\"favourite\" , etc\r\n"
	"together with \"not\" to form a filter",
};

//@author A0083782W
static ByteInt RANDOM_HINTS_N = 4;
static pos_int MAX_COUNT = 10;

class Hinter {
private:
	Hinter();
	Hinter (const Hinter& newHinter);
	void operator = (const Hinter& rightOperand);
	pos_int _counter;
	string _content;
	OperationType mapKeyWord (con_str& mainString );
	
public:
	static Hinter& get();
	string generateHint(const string& userInput);
};

